<!-- inc:header -->
<div class="notice"><div class="p">
	<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td><span class="lead">&nbsp;&raquo; <a href="{:site_url('user')}module_id={:$module_id}&">{:$m_rs[title]}</a> &raquo; 添加/编辑信息</span></td>
	</tr>
	</table>
</div></div>

<form method="post" action="{:site_url('user,setok')}module_id={:$module_id}&id={:$id}" onsubmit="return to_submit();">
<div class="table">
	<div class="left"><span class="red">*</span> 会员名：</div>
	<input type="text" name="name" id="name" value="{:$rs[name]}">
</div>

<div class="table">
	<div class="left"><!-- if(!$id) --><span class="red">*</span> <!-- end -->密码：</div>
	<input type="text" name="pass" id="pass" value="">
	<span class="clue_on"> <!-- if($id) -->不修改密码请保留为空<!-- else -->请填写密码<!-- end --></span>
</div>

<div class="table">
	<div class="left"><span class="red">*</span> 邮箱：</div>
	<input type="text" name="email" id="email" value="{:$rs[email]}">
</div>

<div class="table">
	<div class="left">注册时间：</div>
	<input type="text" name="regdate" id="regdate" onfocus="show_date('regdate')" value="{:$rs[regdate] ? date('Y-m-d H:i',$rs[regdate]) : date('Y-m-d H:i',$sys_app->system_time)}">
</div>

<div class="table">
	<div class="left">手机：</div>
	<input type="text" name="mobile" id="mobile" value="{:$rs[mobile]}">
</div>

<div class="table">
	<div class="left">电话：</div>
	<input type="text" name="tel" id="tel" value="{:$rs[tel]}">
</div>

<div class="table">
	<div class="left">QQ：</div>
	<input type="text" name="qq" id="qq" value="{:$rs[qq]}">
</div>

<div class="table">
	<div class="left">MSN：</div>
	<input type="text" name="msn" id="msn" value="{:$rs[msn]}">
</div>

<div class="table">
	<div class="left">&nbsp;</div>
	<input type="submit" class="button" id="_phpok_submit" name="article_submit" value=" 提交 ">
</div>

</form>

<script type="text/javascript">
function to_submit()
{
	var name = getid("name").value;
	if(!name)
	{
		alert("会员名不允许为空");
		getid("name").focus();
		return false;
	}
	var email = getid("email").value;
	if(!email)
	{
		alert("邮箱不允许为空");
		getid("email").focus();
		return false;
	}
	<!-- if(!$id) -->
	var pass = getid("pass").value;
	if(!pass)
	{
		alert("密码不允许为空");
		getid("pass").focus();
		return false;
	}
	<!-- end -->
	//通过Ajax检测会员账号和邮箱是否重复
	var url = "{:site_url('user,chk')}id={:$id}&email="+EncodeUtf8(email)+"&name="+EncodeUtf8(name);
	var msg = get_ajax(url);
	if(!msg) msg = "error: 检测失败";
	if(msg != "ok")
	{
		alert(msg);
		return false;
	}
	getid("_phpok_submit").disabled = true;
}
</script>
<!-- inc:footer -->